package com.sky.business.sys.event.endpoint;

import com.sky.business.sys.event.BaseEvent;
import com.sky.business.sys.event.ErrorMetadata;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 响应终端请求事件
 */
@Data
@NoArgsConstructor
public class CameraInfoResponseEvent extends BaseEvent {
    /**
     * 元数据
     */
    private ResponseMetadata metadata;

    /**
     * 构造器
     * @param edgeId 边缘中心id
     * @param deviceId 设备id
     * @param deviceInfo 设备信息
     * @param codeStatus 操作状态
     */
    public CameraInfoResponseEvent ( String edgeId, String deviceId,DeviceInfoDto deviceInfo,Integer codeStatus,String message){
        super("CameraInfoResponse",  edgeId);
        metadata  = new ResponseMetadata();
        metadata.setDeviceId(deviceId);
        metadata.setDeviceInfo(deviceInfo);
        metadata.setCodeStatus(codeStatus);
        metadata.setMessage(message);
    }


    @Data
    public static  class ResponseMetadata  extends ErrorMetadata {
        private String deviceId;
        private DeviceInfoDto deviceInfo;
    }


}
